<template>
  <span class="z-time-format">{{time}}</span>
</template>

<script>
import { timeFormat } from '@/components/storybook/utilties/tools'

export default {
  name: 'ZTimeFormat',
  props: {
    value: String,
    timeToken: {
      type: String,
      default: 'HH:mm'
    },
    dateToken: String,
    monday: Boolean
  },
  computed: {
    time () {
      return timeFormat(this.value, this.timeToken, this.dateToken, this.monday)
    }
  }
}
</script>
